import { createApp } from "vue";
import App from "@/App.vue";
//引入模板的全局的样式
import '@/styles/index.scss'
//引入element-plus插件与样式
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//配置element-plus国际化
import zhCn from "element-plus/es/locale/lang/zh-cn";
//暗黑模式的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'virtual:svg-icons-register'; // 引入 SVG 图标注册
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from "@/components";
// import axios from "axios";
//引入路由
import router from "./router";
//引入仓库
import pinia from "./store";

const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn,
});


//安装自定义插件
app.use(globalComponent);

//测试代码：测试假的接口能否使用
// axios.post("/api/user/login", {
//   username: "admin",
//   password: "111111",
// })
// axios.get("/api/user/info").then((res) => {
  
// })
app.use(pinia);
app.use(router);
import './permission'
//引入自定义指令文件
import { isHasButton } from "./directive/has";
isHasButton(app)
app.mount("#app");

// console.log(import.meta.env);
